Optimal. Leaf size=164 \[ -\frac {(43 A-3 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {2 A \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{a^{5/2} d}-\frac {(11 A-3 B) \sin (c+d x)}{16 a d (a \cos (c+d x)+a)^{3/2}}-\frac {(A-B) \sin (c+d x)}{4 d (a \cos (c+d x)+a)^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.47, antiderivative size = 164, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {2978, 2985, 2649, 206, 2773} \[ -\frac {(43 A-3 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {2 A \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{a^{5/2} d}-\frac {(11 A-3 B) \sin (c+d x)}{16 a d (a \cos (c+d x)+a)^{3/2}}-\frac {(A-B) \sin (c+d x)}{4 d (a \cos (c+d x)+a)^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2649
Rule 2773
Rule 2978
Rule 2985
Rubi steps
\begin {align*} \int \frac {(A+B \cos (c+d x)) \sec (c+d x)}{(a+a \cos (c+d x))^{5/2}} \, dx &=-\frac {(A-B) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}+\frac {\int \frac {\left (4 a A-\frac {3}{2} a (A-B) \cos (c+d x)\right ) \sec (c+d x)}{(a+a \cos (c+d x))^{3/2}} \, dx}{4 a^2}\\ &=-\frac {(A-B) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}-\frac {(11 A-3 B) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}+\frac {\int \frac {\left (8 a^2 A-\frac {1}{4} a^2 (11 A-3 B) \cos (c+d x)\right ) \sec (c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx}{8 a^4}\\ &=-\frac {(A-B) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}-\frac {(11 A-3 B) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}+\frac {A \int \sqrt {a+a \cos (c+d x)} \sec (c+d x) \, dx}{a^3}-\frac {(43 A-3 B) \int \frac {1}{\sqrt {a+a \cos (c+d x)}} \, dx}{32 a^2}\\ &=-\frac {(A-B) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}-\frac {(11 A-3 B) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}-\frac {(2 A) \operatorname {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{a^2 d}+\frac {(43 A-3 B) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{16 a^2 d}\\ &=\frac {2 A \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{a^{5/2} d}-\frac {(43 A-3 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \cos (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}-\frac {(A-B) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}-\frac {(11 A-3 B) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.65, size = 126, normalized size = 0.77 \[ \frac {\tan \left (\frac {1}{2} (c+d x)\right ) ((3 B-11 A) \cos (c+d x)-15 A+7 B)-2 (43 A-3 B) \cos ^3\left (\frac {1}{2} (c+d x)\right ) \tanh ^{-1}\left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+64 \sqrt {2} A \cos ^3\left (\frac {1}{2} (c+d x)\right ) \tanh ^{-1}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right )}{16 a d (a (\cos (c+d x)+1))^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.81, size = 339, normalized size = 2.07 \[ -\frac {\sqrt {2} {\left ({\left (43 \, A - 3 \, B\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (43 \, A - 3 \, B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (43 \, A - 3 \, B\right )} \cos \left (d x + c\right ) + 43 \, A - 3 \, B\right )} \sqrt {a} \log \left (-\frac {a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - 3 \, a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - 32 \, {\left (A \cos \left (d x + c\right )^{3} + 3 \, A \cos \left (d x + c\right )^{2} + 3 \, A \cos \left (d x + c\right ) + A\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - 4 \, \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) + 4 \, {\left ({\left (11 \, A - 3 \, B\right )} \cos \left (d x + c\right ) + 15 \, A - 7 \, B\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{64 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 3.50, size = 250, normalized size = 1.52 \[ -\frac {2 \, \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} {\left (\frac {2 \, \sqrt {2} {\left (A a^{5} - B a^{5}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}{a^{8}} + \frac {\sqrt {2} {\left (13 \, A a^{5} - 5 \, B a^{5}\right )}}{a^{8}}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {\sqrt {2} {\left (43 \, A \sqrt {a} - 3 \, B \sqrt {a}\right )} \log \left ({\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2}\right )}{a^{3}} - \frac {64 \, A \log \left ({\left | {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - a {\left (2 \, \sqrt {2} + 3\right )} \right |}\right )}{a^{\frac {5}{2}}} + \frac {64 \, A \log \left ({\left | {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + a {\left (2 \, \sqrt {2} - 3\right )} \right |}\right )}{a^{\frac {5}{2}}}}{64 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.58, size = 445, normalized size = 2.71 \[ -\frac {\sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (43 A \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) \sqrt {2}\, \left (\cos ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -3 B \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) \sqrt {2}\, \left (\cos ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -32 A \ln \left (\frac {4 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}+4 a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+8 a}{2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right ) \left (\cos ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -32 A \ln \left (-\frac {4 \left (a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-\sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}-2 a \right )}{2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-\sqrt {2}}\right ) \left (\cos ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +11 A \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 B \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 A \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}-2 B \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\right )}{32 a^{\frac {7}{2}} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {A+B\,\cos \left (c+d\,x\right )}{\cos \left (c+d\,x\right )\,{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{5/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________